package org.jetlinks.pro.things.data;

import org.hswebframework.web.api.crud.entity.PagerResult;
import org.hswebframework.web.api.crud.entity.QueryParamEntity;
import org.jetlinks.core.message.ThingMessage;
import org.jetlinks.pro.timeseries.query.AggregationData;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.util.Collection;

public class NoneStorageStrategy implements ThingDataStorageStrategy {
    public static final String ID = "none";

    @Override
    public String getId() {
        return NoneStorageStrategy.ID;
    }

    @Override
    public String getName() {
        return "不存储";
    }

    @Override
    public String getDescription() {
        return "不存储物实例数据";
    }

    @Override
    public Mono<Void> save(ThingMessage message) {
        return Mono.empty();
    }

    @Override
    public Flux<ThingPropertyDetail> queryProperty(@Nonnull String thingType, @Nonnull String thingId, @Nonnull String property, @Nonnull QueryParamEntity param) {
        return Flux.empty();
    }

    @Override
    public Flux<ThingPropertyDetail> queryProperties(@Nonnull String thingType,
                                                     @Nonnull String thingId,
                                                     @Nullable Collection<String> properties,
                                                     @Nonnull QueryParamEntity param) {
        return Flux.empty();
    }

    @Override
    public Mono<PagerResult<ThingPropertyDetail>> queryPropertyPage(@Nonnull String thingType, @Nonnull String thingId, @Nonnull String property, @Nonnull QueryParamEntity param) {
        return Mono.empty();
    }

    @Override
    public Flux<AggregationData> aggregationProperties(@Nonnull String thingType,
                                                       @Nonnull String thingId,
                                                       @Nonnull AggregationRequest request,
                                                       @Nonnull PropertyAggregation... properties) {
        return Flux.empty();
    }

    @Override
    public Flux<AggregationData> aggregationEvent(@Nonnull String thingType,
                                                  @Nonnull String thingId,
                                                  @Nonnull String event,
                                                  @Nonnull AggregationRequest request,
                                                  @Nonnull PropertyAggregation... properties) {
        return Flux.empty();
    }

    @Override
    public Flux<ThingEvent> queryEvent(@Nonnull String thingType,
                                       @Nonnull String thingId,
                                       @Nonnull String event,
                                       @Nonnull QueryParamEntity param) {
        return Flux.empty();
    }

    @Override
    public Mono<PagerResult<ThingEvent>> queryEventPage(@Nonnull String thingType,
                                                        @Nonnull String thingId,
                                                        @Nonnull String event,
                                                        @Nonnull QueryParamEntity param) {
        return Mono.empty();
    }

    @Override
    public Flux<ThingMessageLog> queryMessageLog(@Nonnull String thingType,
                                                 @Nonnull String thingId,
                                                 @Nonnull QueryParamEntity param) {
        return Flux.empty();
    }

    @Override
    public Mono<PagerResult<ThingMessageLog>> queryMessageLogPage(@Nonnull String thingType,
                                                                  @Nonnull String thingId,
                                                                  @Nonnull QueryParamEntity param) {
        return Mono.empty();
    }
}
